TCreditCard
Credit Card verification component for Delphi

Introduction
This component can be used in applications where you require to verify credit card numbers before accepting them. A credit card number is verified based on  it's prefix, length and a checksum algorithm. Supported credit cards are Visa (13 or 16 digit), Discover, MasterCard and American Express. This is the easiest and fastest way to verify credit card numbers. A single function call will tell you if a number is valid or not.

Properties

CardType
CardType can be ccVisa, ccMasterCard, ccAmex or ccDiscover depending on the credit card. This can be set at design time or runtime.

CreditCard1.CardType := ccDiscover;

CardNumber
The credit card number. This can include spaces, hyphens, slashes or periods. These will automatically be discarded, so your application can accept the number in any format, even using a standard Edit field. This can be set at design time or runtime.

CreditCard1.CardNumber := Edit1.Text;

Methods

VerifyCard : Boolean;
This is all that is required to verify the card. Call VerifyCard after you've set the CardType and CardNumber properties. Returns true if the card is valid, otherwise returns false.

if CreditCard1.VerifyCard = false then ShowMessage('INVALID CARD!') else {accept payment...}

Registration

When you register, you will get the source code for TCreditCard. This will let you use the component with any version of Delphi 1,2 or 3.

Registration of TCreditCard costs US $20.00, which entitles you to full source code, updates and tech support (via e-mail).

To register, send a check or money order for US $20.00 or equivalent to:

Mehul Sampat
1092 Colby
Normal, IL 61761
USA

When your payment is received, you will be sent the latest version of this, component along with source code, a demo program and other resources, including an explanation of how the verification is done with various credit cards.

All this will be sent via e-mail, so PLEASE SPECIFY YOUR E-MAIL ADDRESS. If you want to be sent this software on a diskette, kindly add $2 for US orders, and $5 for international orders to cover postage.

If you have any questions about this component, e-mail the author at:

mnsampa@rs6000.cmp.ilstu.edu

Enjoy!